<template>
  <el-table
    :data="tableData"
    border
    max-height="99999"
    class="ccui-form-child-table"
    ref="materialList"
  >
    <el-table-column
      v-for="(item, i) in tableColumnSendOutList"
      :label="item.label"
      :type="item.type"
      :prop="item.prop"
      :width="item.width"
      :align="item.align"
      :fixed="item.fixed"
      :key="i"
      :show-overflow-tooltip="true"
    >
    </el-table-column>
    <el-table-column
      :show-overflow-tooltip="true"
      prop="scaleNum"
      label="操作"
      align="center"
      header-align="center"
      appendixInfor.vue
      min-width="70%"
    >
      <template slot-scope="scope">
        <span
          style="color: #0089ef; cursor: pointer"
          @click="goToDeliveryDetail(scope.row)"
          >查看</span
        >
      </template>
    </el-table-column>
  </el-table>
</template>

<script>
export default {
  name: "sendOutList",
  data() {
    return {
      tableData: [],
      tableColumnSendOutList: [
        {
          type: "index",
          label: "序号"
        },
        {
          label: "发货单编号",
          prop: "shipCode"
        },
        {
          label: "发货日期",
          prop: "buildDate"
        },
        {
          label: "状态",
          prop: "shipStatusName"
        }
      ]
    };
  },
  methods: {
    goToDeliveryDetail(row) {
      this.$router.push({
        path: `/orderManagement/close/sub-detail/${row.id}`,
        query: {
          type: this.$route.query.type
        }
      });
    }
  }
};
</script>

<style scoped></style>
